package com.example.lhsama.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.lhsama.dao.UserMapper;
import com.example.lhsama.domain.Orders;
import com.example.lhsama.domain.Product;
import com.example.lhsama.domain.Role;
import com.example.lhsama.domain.User;
import com.example.lhsama.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Transactional
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User selectByName(String s) {
        return userMapper.selectByName(s);
    }

    @Override
    public List<Role> getRolesList(Integer uid) {
        return userMapper.getRolesList(uid);
    }

    @Override
    public void deleteRoleByUid(Integer uid) {
        userMapper.deleteRoleByUid(uid);
    }

}
